(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/resources/Script/Ssg/API/WX/WXUI.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, 'f33dfpsbmpKZafrO50jt1ZT', 'WXUI', __filename);
// resources/Script/Ssg/API/WX/WXUI.js

'use strict';

var WXUI = cc.Class({

    statics: {

        /**
         *显示的标题， 图标（success/loading）, 延迟的时间
         */
        makeText: function makeText(showContent, iconFlag, mDuration) {
            var iconType = iconFlag == 0 ? 'success' : 'loading';
            wx.showToast({
                title: showContent,
                icon: iconType,
                duration: mDuration
            });
        },
        /**
         * 判断用户是不是IPHONEX
         */
        setUserIsIpX: function setUserIsIpX() {
            if (SystemInfo.getPlatform() != 'weChatGame') {
                return;
            }
            var systemInfo = wx.getSystemInfoSync();;
            var model = systemInfo.model.toString();
            if (model.search("iPhone X") != -1) {
                SystemInfo.setRunInIphoneX(true);
            }
        },

        /**
         * 打开客服对话
         */
        openCustomerServiceConversation: function openCustomerServiceConversation() {
            if (SystemInfo.getPlatform() != 'weChatGame') {
                return;
            }

            wx.openCustomerServiceConversation({
                success: function success() {
                    //console.log('正常打开客服会话!');
                },
                fail: function fail() {
                    //console.log('打开客服会话失败!');
                },
                complete: function complete() {}
            });
        }

    }
});

module.exports = WXUI;

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=WXUI.js.map
        